<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<title><?php echo ($rs_systemName["sName"]); ?>-登陆中心</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
 
<link rel="stylesheet"
	href="/Public/Theme1/login2/assets/css/reset.css">
<link rel="stylesheet"
	href="/Public/Theme1/login2/assets/css/supersized.css">
<link rel="stylesheet"
	href="/Public/Theme1/login2/assets/css/style.css">
 
<style>
	.page-container{
		margin: 174px 0 0 250px
	}
	.sdafew{
	 
		width: 350px;
		height:341px;
		background: #fff;
		border-radius: 25px;
		padding: 10px;
	}
	.sdafew input{
		color: #000;
	}
	.dfc{
		width: 100%;height: auto;
		color: #000;
		line-height: 30px;
		font-size: 12px;
		text-align: left;
	}
	.dfc .dct{
		width: 12px;
		height: 12px;
		line-height: 30px;
		margin-top: 5px;
	}
	.dfccd{
		width: 100%;height: auto;
		margin: 22px 0;
	}
	.dfccd input{
		margin: 0px;
		border-radius: 25px;
		border: 1px #ccc solid;
		background: #fff;
		color: #000;
	}
		input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
			color:#666;
		}

		input:-moz-placeholder,textarea:-moz-placeholder{
			color:#666;
		}

		input::-moz-placeholder,textarea::-moz-placeholder{
			color:#666;
		}
		input:-ms-input-placeholder,textarea:-ms-input-placeholder{
			color:#666;
		}


	button{
		margin-top: 0px;
		margin-bottom: 10px;
	}
	.sdafew p{
		color: rgb(189, 109, 109);
		padding:0 25px ;
		text-align: left;
		line-height: 25px;
		font-size: 12px;
	}
	.dsayt{
		line-height: 30px;
		color:#347bef ;
		font-size:29px;
		font-weight: normal;
	}
	.dsayt b{
 
		font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
		font-weight: 600;
	}
	.dsayt font{
		font-size: 18px;
	}.dsayt font{
		font-size: 18px;
	}
	#ffdd2{
		display: none;
	}
</style>
</head>
<body  style="background:url(/Public/Theme1/img/dsag.jpg) no-repeat top center;background-size: 100% ;">

	<div class="page-container">
		 
	   <div class="sdafew">
		
			<form   method="post" id="ffdd">
				<div class="dsayt"><b id="dsa2">登录</b>/<font class="dsy1">客户注册</font></div>
				<div class="dfc">
					<input type="radio" class="dct" name="types" value="1" checked>&nbsp; 系统 &nbsp;&nbsp;&nbsp;  
					<input type="radio" class="dct" name="types" value="0">&nbsp;平台
				</div>
				<div class="dfccd">
					<input type="text" name="aUser"  class="username fgjf"
					placeholder="请输入用户名"  value="system" > 
				</div>
				<div class="dfccd">
					<input type="password" name="aPwd"   class="aPwd fgjf"
						placeholder="请输入密码"  value="123456">
				</div>
				<div class="dfccd">
						<input
							type="text" class="code" name="code" placeholder="验证码" required
							style="width: 48%; float: left; margin-right: 4%" required>
						<img alt="点击更换" title="点击更换" src="/Verify/Verify/"
							onclick="this.src='/Verify/Verify/random/'+Math.random();"
							width="100px" style="margin-top:5px;">  
				</div>
				<button type="button" id="sadyc" style="background:#347bef;border:#347bef;border-radius: 25px;">登 陆</button>
				<p>系统：管理员/业务员/财务/采购/仓库/厂长主任</p> 
			<p>平台：车间组长/客户/员工;</p> 
			</form>

			<form   method="post" id="ffdd2">
				<div class="dsayt"><font class="dsy2">登录</font>/<b id="dsa2">客户注册</b></div>
			 
				<div class="dfccd">
					<input type="text" name="username"  class="usernames fgjf"
					placeholder="请输入登录账号"  > 
				</div>
				<div class="dfccd">
					<input type="text" name="company"   class="company fgjf"
						placeholder="请输入企业名称"  >
				</div>
				<div class="dfccd">
					<input type="password" name="password"   class="aPwds fgjf"
						placeholder="请输入登录密码"  >
				</div>
				<div class="dfccd">
					<input type="text" name="names"   class="names fgjf"
						placeholder="请输入真实姓名"  >
				</div>
				<div class="dfccd">
					<input type="text" name="mobile"   class="mobile fgjf"
						placeholder="请输入手机号码"  >
				</div>
				<div class="dfccd">
					<input type="text" name="address"   class="address fgjf"
						placeholder="请输入收货地址"  >
				</div>
				<div class="dfccd">
						<input
							type="text" class="codes" name="code" placeholder="验证码" required
							style="width: 48%; float: left; margin-right: 4%" required>
						<img alt="点击更换" title="点击更换" src="/Verify/Verify/"
							onclick="this.src='/Verify/Verify/random/'+Math.random();"
							width="100px" style="margin-top:5px;">  
				</div>
				<button type="button" id="sgjc" style="background:#347bef;border:#347bef;border-radius: 25px;">立即注册</button>
				
			</form>

			
			
	 </div>
		 
	</div>
	<script src="/Public/Theme1/login2/assets/js/jquery-1.8.2.min.js"></script>
	<script src="/Public/Theme1/js/plugins/layer/layer.min.js?v=2.1.4"></script>
	<script>
	 $('.dsy1').click(function(){
		 $("#ffdd2").show();
		 $("#ffdd").hide();
	 }); 
	 $('.dsy2').click(function(){
		 $("#ffdd").show();
		 $("#ffdd2").hide();
	 }); 
	 //客户注册
	 $("#sgjc").click(function(){ 
        var url="/Personnelsystem/Login/Register/";
        let json = $('#ffdd2').serialize();
		var username=$(".usernames").val();
		var company=$(".company").val();
		var names=$(".names").val();
		var mobile=$(".mobile").val();
		var address=$(".address").val();
		var aPwd=$(".aPwds").val();
		var code=$(".codes").val();
        if(username==''){
            layer.msg("请输入用户名");
			return false;
        }
		if(username.length<5){
            layer.msg("请输入5位字符以上用户名");
			return false;
        }
		if(company==''){
            layer.msg("请输入企业名称");
			return false;
        }
		if(aPwd==''){
            layer.msg("请输入登录密码");
			return false;
        }
		if(aPwd.length<6){
            layer.msg("请输入6位数以上的登录密码");
			return false;
        }
		if(names==''){
            layer.msg("请输入真实姓名");
			return false;
        }
		if(mobile==''){
            layer.msg("请输入手机号码");
			return false;
        }
		if(mobile.length!=11){
            layer.msg("请输入11位数手机号码");
			return false;
        }
		if(address==''){
            layer.msg("请输入收货地址");
			return false;
        }
		if(code==''){
            layer.msg("请输入验证码");
			return false;
        }
        $.ajax({
            type: "POST",
            url: url,
            data: json,
            dataType : "json",
            success: function(sdfwe){
                if(sdfwe.code==200){
                    layer.msg(sdfwe.msg);
                }else{
                     layer.msg(sdfwe.msg);
                     return false;
                }
            }
        });
    })
	  //登录
	  $("#sadyc").click(function(){ 
        var url="/Personnelsystem/Login/CheckLogin/";
        let json = $('#ffdd').serialize();
		var username=$(".username").val();
		var aPwd=$(".aPwd").val();
		var code=$(".code").val();
        if(username==''){
            layer.msg("请输入用户名");
			return false;
        }
		

		if(aPwd==''){
            layer.msg("请输入密码");
			return false;
        }
		if(code==''){
            layer.msg("验证码");
			return false;
        }
        $.ajax({
            type: "POST",
            url: url,
            data: json,
            dataType : "json",
            success: function(sdfwe){
                if(sdfwe.code==200){
                    layer.msg(sdfwe.msg);
					window.location.href="/Personnelsystem/Login/index";
                }else{
                     layer.msg(sdfwe.msg);
                     return false;
                }
            }
        });
    })
	</script>
</body>

</html>